# -*- coding: utf-8 -*-
# import numpy as np
import cv2
#读取图片1
img_cat = cv2.imread('C:/Users/sunset0522/Desktop/opencv/test0403/cat1.jpg',1)
print(img_cat.shape)
#读取图片2
img_back = cv2.imread('C:/Users/sunset0522/Desktop/opencv/test0403/back.jpg',1)
print(img_back.shape)
#修改图片尺寸
img_cat = cv2.resize(img_cat,(500,350))
img_back = cv2.resize(img_back,(500,350))
print(img_back.shape)
#图片融合
res = cv2.addWeighted(img_cat,0.7,img_back,0.5,7)
cv2.imshow('res',res)   #显示图片
cv2.imwrite('mix.jpg', res)     #保存融合的图片
cv2.waitKey(0)
cv2.destroyAllWindows()
